package com.lxq.autovolume.broadcast

import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.media.AudioManager
import com.lxq.autovolume.MainActivity

open class VolumeBroadcast(var activePage: MainActivity) : BroadcastReceiver(){
    override fun onReceive(context: Context?, intent: Intent?) {
        activePage.volumeProgress.progress=activePage.audioManager.getStreamVolume(AudioManager.STREAM_MUSIC)
    }
}